//
//  GYPNetworking.h
//  AmountBody
//
//  Created by smm on 17/12/6.
//  Copyright © 2017年 RCMTM. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface GYPNetworking : NSObject

+(id)netWorkingPOSTWithParameters:(NSString *)parameters andPost:(NSString *)postStr andSuccess:(void (^)(id, id, bool))success andFailure:(void (^)(NSError *))failure;/**< 用于头部和参数分离 网络请求*/
//图片上传
+(void)uploadImageWithParametersString:(NSString *)parameters andPost:(NSString*)post andImageArray:(NSArray *)imageArray andTargetWidth:(CGFloat)width andSuccess:(void (^)(id, id, bool))success andFailure:(void (^)(NSError *))failure;
//图片/音频上传
+(void)uploadImageWithParametersString:(NSString *)parameters andPost:(NSString*)post andImageArray:(NSArray *)imageArray andVideo:(NSArray*)videoArray andTargetWidth:(CGFloat)width andSuccess:(void (^)(id, id, bool))success andFailure:(void (^)(NSError *))failure;

//单独解析相关
//依据数组生成model，生成Model数据类型的类，以存放数据
+(NSArray *)createArrayFromArray:(NSArray *)tmpArray andClassName:(NSString *)className andPropertyArray:(NSArray *)propertyArray andKeysArray:(NSArray *)keysArray;

//依据字典生成model，生成Model数据类型的类，以存放数据
+(NSObject *)createObjectFromDictionary:(NSDictionary *)tmpDic andClassName:(NSString *)className andPropertyArray:(NSArray *)propertyArray andKeysArray:(NSArray *)keysArray;
#pragma mark -- 默认解析方式，只返回最原始的经过json解析的数据
+(id)parseToDefaultValueWithData:(id)parseDataId;

//检查更新
+(void)checkversion:(void (^)(BOOL hasnewversion))result;

@end
